<%@ page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8" trimDirectiveWhitespaces="true"%>
<%@ include file="/WEB-INF/views/include.inc.jsp"%>

<style>

.searchBar ul.searchContent li 
{
    width: auto;
}
li >label
{
	    text-align: right;
}
	
</style>
<div class="pageContent">
	
	
	<div class="tabs" currentIndex="0" eventType="click" >
		<div class="tabsHeader">
			<div class="tabsHeaderContent">
				<ul>
					<li><a href="javascript:;"><span>性能监控列表</span></a></li>
					<li><a href="${contextPath}/monitor/report" class="j-ajax"><span>性能报表</span></a></li>
				</ul>
			</div>
		</div>
		<div class="tabsContent" >
			<div >
				<dwz:paginationForm action="${contextPath}/monitor/index" page="${page}" onsubmit="return navTabSearch(this)">
					<input type="hidden" name="search_LIKE_uri" value="${param.search_LIKE_uri}"/>
					<input type="hidden" name="search_GT_exetime" value="${param.search_GT_exetime}"/>
					<input type="hidden" name="search_GT_createTime" value="${param.search_GT_createTime}"/>
					<input type="hidden" name="search_LT_createTime" value="${param.search_LT_createTime}"/>
				</dwz:paginationForm>
				<form method="post" action="${contextPath }/monitor/index" onsubmit="return navTabSearch(this)">
						<div class="pageHeader">
							<div class="searchBar">
								<ul class="searchContent">
									<li>
										<label>入口地址：</label>
										<input type="text" name="search_LIKE_uri" value="${param.search_LIKE_uri}"/>
									</li>
									<li>
										<label>执行时间(>)：</label>
										<input type="text" name="search_GT_exetime" value="${param.search_GT_exetime}"/>
									</li>
									<li>
										<label>时间段：</label>
										<input type="text" name="search_GT_createTime" value="${param.search_GT_createTime}" class="date textInput readonly valid" datefmt="yyyy-MM-dd HH:mm:ss" readonly="true">
										-<input type="text" name="search_LT_createTime" value="${param.search_LT_createTime}" class="date textInput readonly valid" datefmt="yyyy-MM-dd HH:mm:ss" readonly="true">
									</li>
									</li>
									<li style="float:right">
									<div class="button"><div class="buttonContent"><button type="submit">检索</button></div></div>
									</li>
								</ul>
								
							</div>
						</div>
					</form>
			<div class="pageContent">
	
			<table class="table" layoutH="120" width="100%">
				<thead>
					<tr>
						<th width="22"><input type="checkbox" group="ids" class="checkboxCtrl"></th>
						<th>入口地址</th>
						<th>执行时间(毫秒)</th>
						<th>后台执行时间(毫秒)</th>
						<th>模板渲染时间(毫秒)</th>
						<th>用户名</th>
						<th>IP</th>
						<th>创建时间</th>
				</tr>
				</thead>
				<tbody>
				<c:forEach var="item" items="${monitorList}">
				<tr target="slt_uid" rel="${item.id}">
				
						<td><input name="ids" value="${item.id}" type="checkbox"></td>
						<td>${item.uri}</td>
						<td>
						<c:if test="${item.exetime<=1000}">
							<span style="color:green">${item.exetime}</span>
						</c:if>
						<c:if test="${item.exetime>=1000 && item.exetime<2000}">
							<span style="color:yellow">${item.exetime}</span>
						</c:if>
						<c:if test="${item.exetime>2000 }">
							<span style="color:red">${item.exetime}</span>
						</c:if>
						</td>
						<td>
							<c:if test="${item.javaExetime<=1000}">
							<span style="color:green">${item.javaExetime}</span>
							</c:if>
							<c:if test="${item.javaExetime>=1000 && item.javaExetime<2000}">
								<span style="color:yellow">${item.javaExetime}</span>
							</c:if>
							<c:if test="${item.javaExetime>2000 }">
								<span style="color:red">${item.javaExetime}</span>
							</c:if>
						</td>
						<td>
							<c:if test="${item.tplExetime<=1000}">
							<span style="color:green">${item.tplExetime}</span>
							</c:if>
							<c:if test="${item.tplExetime>=1000 && item.tplExetime<2000}">
								<span style="color:yellow">${item.tplExetime}</span>
							</c:if>
							<c:if test="${item.tplExetime>2000 }">
								<span style="color:red">${item.tplExetime}</span>
							</c:if>
						</td>
						<td>${item.username}</td>
						<td>${item.ip}</td>
						<td><fmt:formatDate value="${item.createTime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
				</tr>
				</c:forEach>
			</tbody>
		</table>
	
		<!-- 分页 -->
		<dwz:pagination page="${page}" />

	
			</div>
	</div>
			
			<div></div>
			
			
		</div>
		<div class="tabsFooter">
			<div class="tabsFooterContent"></div>
		</div>
	</div>
	
	
</div>
   